﻿using ChessGame.Pieces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChessGame.Pieces
{
    /// <summary>
    /// Knight class
    /// </summary>
    public class Knight : Chesspiece
    {
        /// <summary>
        /// Knight Object
        /// </summary>
        /// <param name="_colour">Side colour of the Knight</param>
        /// <param name="_positionX">Position X</param>
        /// <param name="_positionY">Position Y</param>
        public Knight(Boolean _colour, int _positionX, int _positionY)
        {
            Colour = _colour;
            PositionX = _positionX;
            PositionY = _positionY;
            Type = "Knight";
            PieceValue = 3;
            movement = new Movement.Movement();
            startMovement = new Movement.Movement();
            hit = new Movement.Hit();

            movement.Add(2, 1);
            movement.Add(1, 2);
            movement.Add(2, -1);
            movement.Add(-1, 2);
            movement.Add(-2, 1);
            movement.Add(1, -2);
            movement.Add(-2, -1);
            movement.Add(-1, -2);

            hit.Add(2, 1);
            hit.Add(1, 2);
            hit.Add(2, -1);
            hit.Add(-1, 2);
            hit.Add(-2, 1);
            hit.Add(1, -2);
            hit.Add(-2, -1);
            hit.Add(-1, -2);

            firstMove = false;
        }
    }
}
